import request from "@/utils/request";

export async function login(
  body: any,
  options?: { [key: string]: any },
):Promise<any> {
  return request('/user/login', {
    method: 'POST',
    data: {
      id: body.username,
      password: body.password
    },
    ...(options || {})
  })

}

/** 发送验证码 POST /api/login/captcha */
export async function getFakeCaptcha(
  params: {
    // query
    /** 手机号 */
    phone?: string;
  },
  options?: { [key: string]: any },
): Promise<boolean> {
  return false
}

export async function queryUserInfo(options?: { [key: string]: any }) {
  return request('/user/info', {
    method: 'GET',
    ...(options || {})
  })
  
}
